package com.road7.mina.simpledemo;

import org.apache.mina.core.service.IoHandlerAdapter;
import org.apache.mina.core.session.IdleStatus;
import org.apache.mina.core.session.IoSession;

public class TimeClientHandler extends IoHandlerAdapter {

	@Override
	public void messageReceived(IoSession session, Object message) throws Exception {
		System.out.println("3.client messageReceived");
		System.out.println(message);
	}

	@Override
	public void sessionOpened(IoSession session) throws Exception {
		System.out.println("1.client sessionOpened");
	}

	@Override
	public void sessionCreated(IoSession session) throws Exception {
		System.out.println("2.client sessionCreated");
	}

	@Override
	public void sessionIdle(IoSession session, IdleStatus status) throws Exception {
		System.out.println("4.client sessionIdle");
	}

	@Override
	public void sessionClosed(IoSession session) throws Exception {
		System.out.println("5.client sessionClosed");
	}

}
